{% block doc -%}
<!DOCTYPE html>
<html lang="zh-CN" {% block html_attribs %}{% endblock html_attribs %} >
  {%- block html %}
  <head>
  {%- block head %}
  <title>{% block title %}{{title|default}}{% endblock title %}</title>

  {%- block metas %}
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" href="{{ url_for_static('static', filename='icon/favicon.ico') }}">
  {%- endblock metas %}

  {%- block styles %}
  <link href="{{ url_for_static('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
  <link href="{{ url_for_static('static', filename='plugins/fontawesome/css/all.min.css') }}" rel="stylesheet">
  <link href="{{ url_for_static('static', filename='plugins/toastr/toastr.min.css') }}" rel="stylesheet">
  <link href="{{ url_for_static('static', filename='plugins/sweetalert2/sweetalert2.min.css') }}" rel="stylesheet">
{#  <link href="{{ url_for('static', filename='plugins/sweetalert2/themes/bootstrap-4/bootstrap-4.min.css') }}" rel="stylesheet">#}
  <link href="{{ url_for_static('static', filename='plugins/tippyjs/tippy.js/themes/light.css') }}" rel="stylesheet">
  <link href="{{ url_for_static('static', filename='plugins/tippyjs/tippy.js/themes/light-border.css') }}" rel="stylesheet">
  <link href="{{ url_for_static('static', filename='plugins/tippyjs/tippy.js/themes/material.css') }}" rel="stylesheet">
  <link href="{{ url_for_static('static', filename='plugins/tippyjs/tippy.js/themes/translucent.css') }}" rel="stylesheet">
  <link href="{{ url_for_static('static', filename='css/base.css') }}" rel="stylesheet">
  {%- endblock styles %}
  {%- endblock head %}
  </head>

  <body{% block body_attribs %}{% endblock body_attribs %}>
  {% block body -%}

  {% block navbar %}
    {% if 'case.html' in self.__str__() %}
    {% elif 'scene_setting.html' in self.__str__() %}
    {% elif 'blank.html' in self.__str__() %}
    {% elif 'if.html' in self.__str__() %}
    {% elif 'loop.html' in self.__str__() %}
    {% elif 'while.html' in self.__str__() %}
    {% elif 'simple.html' in self.__str__() %}
    {% else %}
      {% include '_navbar.html' %}
    {% endif %}
  {%- endblock navbar %}
  {% block content -%}
  <div class="container-fluid">

    {% include '_messages.html' %}
  {# application content needs to be provided in the app_content block #}
  {% block app_content %}{% endblock %}
  </div>
  <div class="btn-help" role="button" tabindex="0">?</div>
  <div style="display: none;">
    <div class="card" style="width: 20vw; border: none;">
      <div class="card-body">
        <h5 class="card-title">帮助与操作指引</h5>
        <p class="card-text">当前项目处于频繁更新的初步阶段，请大家提出宝贵意见。</p>
      </div>
      <ul class="list-group list-group-flush">
        <li class="list-group-item">
          <a href="https://gitee.com/azhengzz/api-automation-test/blob/master/README.md" class="card-link" target="_blank"><i class="fab fa-readme"></i> 点击查看操作介绍</a>
        </li>
        <li class="list-group-item">
          <a href="https://gitee.com/azhengzz/api-automation-test/issues?assignee_id=&author_id=&branch=&collaborator_ids=&issue_search=&label_ids=&label_text=&milestone_id=&program_id=&scope=&sort=&state=all" class="card-link" target="_blank"><i class="fas fa-question-circle"></i> 使用问题请提issue</a>
        </li>
        <li class="list-group-item">
          <a href="https://gitee.com/azhengzz/api-automation-test" class="card-link" target="_blank">
            <svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em">
                <path d="M384 1003.2c-145.6-41.6-276.8-155.2-340.8-297.6-46.4-102.4-46.4-284.8 0-388.8 48-105.6 152-212.8 259.2-264 128-62.4 291.2-62.4 419.2 0 107.2 51.2 211.2 160 259.2 264 49.6 113.6 48 273.6-8 388.8-105.6 228.8-366.4 360-588.8 297.6z" fill="#D90013"></path>
                <path d="M203.2 820.8c-6.4-4.8-11.2-112-11.2-236.8 0-209.6 3.2-232 36.8-281.6 64-96 116.8-112 371.2-107.2l224 4.8v128l-228.8 8c-179.2 6.4-232 12.8-243.2 32-8 12.8-16 91.2-16 172.8v147.2h158.4c166.4 0 201.6-14.4 190.4-75.2-4.8-24-24-28.8-121.6-33.6l-115.2-4.8v-126.4h387.2l-6.4 118.4c-6.4 136-35.2 192-126.4 236.8-43.2 24-96 28.8-272 28.8-120 0-222.4-4.8-227.2-11.2z" fill="#FFFEFE"></path>
            </svg>
            Fork/Star on Gitee
          </a>
        </li>
        <li class="list-group-item">
          <div style="color: rgba(55, 53, 47, 0.4);"><small>ApiAutomationTest: Version {{ version }}</small></div>
        </li>
      </ul>
    </div>
  </div>

  {%- endblock content %}

  {% block scripts %}
  <script src="{{ url_for_static('static', filename='js/jquery.min.js') }}"></script>
{#  <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>#}
  <script src="{{ url_for_static('static', filename='js/bootstrap.bundle.min.js') }}"></script>
  <script src="{{ url_for_static('static', filename='plugins/socket.io/socket.io.js') }}"></script>
  <script src="{{ url_for_static('static', filename='plugins/toastr/toastr.min.js') }}"></script>
  <script src="{{ url_for_static('static', filename='plugins/sweetalert2/sweetalert2.all.min.js') }}"></script>
  <script src="{{ url_for_static('static', filename='plugins/tippyjs/@popperjs/core/dist/umd/popper.min.js') }}"></script>
  <script src="{{ url_for_static('static', filename='plugins/tippyjs/tippy.js/dist/tippy-bundle.umd.min.js') }}"></script>
  <script src="{{ url_for_static('static', filename='js/base.js') }}"></script>
  <script type="text/javascript">
    var csrf_token="{{ csrf_token() }}";
    {% if current_user.is_authenticated %}
    var user_socket=io('/user/{{ current_user.id }}');
    {% endif %}
  </script>
  {%- endblock scripts %}

  {%- endblock body %}
  </body>
  {%- endblock html %}
</html>
{% endblock doc -%}
